<form class="form-horizontal" role="form" data-toggle="validator">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-4">姓名:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-name" data-rule="required" class="form-control" name="row[rector]" type="text" value="<?php echo $rector['name']; ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-4">微信:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-wechat" data-rule="required" class="form-control" name="row[wechat]" type="text" value="<?php echo $rector['wechat']; ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-4">电话:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-phone" data-rule="required" class="form-control" name="row[phone]" type="text" value="<?php echo $rector['phone']; ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-4">邮箱:</label>
        <div class="col-xs-12 col-sm-4">
            <input id="c-email" data-rule="required" class="form-control" name="row[email]" type="text" value="<?php echo $rector['email']; ?>">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-4"></label>
        <div class="col-xs-10 col-sm-4">
            <input type="button" class="btn btn-success btn-embossed" value="{:__('OK')}" onclick="login()">
<!--            <span id="rector" class="btn btn-success btn-embossed">{:__('OK')}</span>-->
<!--            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>-->
        </div>
    </div>

</form>

<script>

   function login() {
       var name = $("#c-name").val();
       var wechat = $("#c-wechat").val();
       var phone = $("#c-phone").val();
       var email = $("#c-email").val();
       $.post("chase/setting/rector", {
           name: name,
           wechat: wechat,
           phone: phone,
           email: email
       }, function (res) {
            layer.msg("修改成功")
       })
   }

</script>